Ext.namespace('Ext.xredman');

Ext.xredman.Person = function(_cfg){
	Ext.apply(this, _cfg);
}

Ext.apply(Ext.xredman.Person.prototype,{
	job:'无',
	print:function(){
		alert(String.format('姓名:{0}, 性别:{1},职业:{2}', this.name, this.sex, this.job));
	}
});
///////////////////////////////////
Ext.xredman.Sutdent = function(_cfg){
	Ext.apply(this, _cfg);
}
Ext.extend(Ext.xredman.Sutdent, Ext.xredman.Person,{
	job:'学生'
});
//sample
var _student = new Ext.xredman.Sutdent({name:'xredman',sex:'man', job:'学生'});
_student.print();
/**
 * Javba代码对照
 * class Student extend Person{
 * 	public Student(String name, String sex){
 * 	super(name, sex);
 * this.setJob('学生');
 * }
 * }
 */